<template>
  <div class="header">
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
      <div class="navbar-header" id="navbar-header" ref="navbarHeader">
        <img src="../assets/img/header.png" />
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav" id="navbar-nav">
          <div class="navbar-nav-div active-div">
            <div class="nav-div">
              <span class="nav-span">首页</span>
            </div>
          </div>
          <div class="navbar-nav-div">
            <div class="nav-div">
              <span>
                <span class="nav-span">业务图谱</span>
                <div class="drop-down">
                  <div>
                    <ul>
                      <li>图谱可视化</li>
                      <li>本体管理</li>
                      <li>实体管理</li>
                    </ul>
                  </div>
                </div>
              </span>
            </div>
          </div>
          <div class="navbar-nav-div">
            <div class="nav-div">
              <span>
                <span class="nav-span">民政智库</span>
                <div class="drop-down">
                  <div>
                    <ul>
                      <li>文件管理</li>
                      <li>知识检索</li>
                    </ul>
                  </div>
                </div>
              </span>
            </div>
          </div>
          <div class="navbar-nav-div">
            <div class="nav-div">
              <span>
                <span class="nav-span">数据管理</span>
                <div class="drop-down">
                  <div>
                    <ul>
                      <li>元数据管理</li>
                      <li>主数据管理</li>
                      <li>安全中心</li>
                      <li>数据治理</li>
                      <li>多维分析</li>
                      <li>任务调度</li>
                      <li>数据集成</li>
                      <li>智能标注</li>
                      <li>实时流分析</li>
                    </ul>
                  </div>
                </div>
              </span>
            </div>
          </div>
          <div class="navbar-nav-div">
            <div class="nav-div">
              <span>
                <span class="nav-span">数据超市</span>
                <div class="drop-down">
                  <div>
                    <ul>
                      <li>应用市场</li>
                      <li>API市场</li>
                    </ul>
                  </div>
                </div>
              </span>
            </div>
          </div>
          <div class="navbar-nav-div">
            <div class="nav-div">
              <span>
                <span class="nav-span">领导驾驶舱</span>
                <div class="drop-down">
                  <div>
                    <ul>
                      <li>综合看板</li>
                      <li>敏捷BI</li>
                    </ul>
                  </div>
                </div>
              </span>
            </div>
          </div>
          <div class="navbar-nav-div">
            <div class="nav-div">
              <span>
                <span class="nav-span">服务与支持</span>
              </span>
            </div>
          </div>
        </ul>
        <ul class="nav navbar-nav navbar-right" id="navbar-right">
          <li>
            <div>
              <button class="dropbtn">欢迎您，user</button>
            </div>
          </li>
          <li>
            <a class="self-icon">
              <span class="glyphicon glyphicon-bell"></span>
            </a>
          </li>
          <li>
            <a class="self-icon">
              <span class="glyphicon glyphicon-cog"></span>
            </a>
          </li>
        </ul>
      </div>
    </nav>
  </div>
</template>
<script>
export default {
  data() {
    return {
      imgWidth: "",
    };
  },
  created() {
    this.$nextTick(function () {
      this.imgWidth = window.innerWidth;
    });
  },
  watch: {
    imgWidth() {},
  },
};
</script>
<style scoped>
.navbar-header {
  margin-left: 0px;
  padding-right: -100;
  padding-left: 35px;
  padding-top: 15px;
}

.navbar-header img {
  float: left;
  height: 30px;
  max-width: 280px;
  margin-right: 30px;
}

.navbar-nav {
  float: left;
  min-width: 14px;
  height: 60px;
}

.navbar-nav-div {
  display: inline-block;
  height: 100%;
}

.nav-div {
  width: 114px;
  text-align: center;
  float: left;
  height: 100%;
}

.active-div {
  background: linear-gradient(180deg, #0925b5, #2e43b7);
}

.nav-span {
  color: #fff;
  font-weight: 400;
  font-size: 16px;
  opacity: 0.9;
  padding: 0 10px;
  display: block;
  line-height: 60px;
}

.drop-down {
  width: auto;
  z-index: 2079;
  transform-origin: center top;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  top: 52px !important;
  box-shadow: none !important;
  display: none;
}

.navbar-nav-div:hover {
  background: linear-gradient(180deg, #566ee6, #5868c2);
}

.navbar-nav-div:hover .drop-down {
  display: block;
}

.drop-down li:hover {
  background: #2e43b7;
}

.drop-down div {
  display: block !important;
  background: #001d4a;
  height: 100%;
}

.drop-down div ul {
  list-style: none;
  width: 114px;
  height: auto;
  text-align: center;
  padding: 8px 0px;
}

.drop-down div ul li {
  color: #fff;
  font-size: 16px;
  height: 40px;
  line-height: 40px;
  padding: 0;
  display: block;
  position: relative;
  cursor: pointer;
}

.navbar-right div {
  margin-left: 20px;
}

.navbar-right button {
  font-size: 14px;
}

.self-icon {
  padding-bottom: 24px;
  padding-top: 20px;
}

.glyphicon-bell:hover {
  cursor: pointer;
  color: rgb(36, 88, 231);
}

.glyphicon-cog:hover {
  cursor: pointer;
  color: rgb(36, 88, 231);
}

.glyphicon-bell {
  color: blanchedalmond;
}

.glyphicon-cog {
  color: blanchedalmond;
}

.navbar {
  top: 0px;
  background-color: #2e43b7;
  margin-bottom: 0px;
  border: none;
  z-index: 3;
}

.dropbtn {
  background-color: #2e43b7;
  color: #eaeff4;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-bottom-width: 10px;
  margin-bottom: 0px;
  padding-right: 30px;
  padding-left: 30px;
  padding-top: 20px;
  width: 100%;
  padding-bottom: 20px;
}
</style>
